<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

Route::group(['prefix' => 'mastedu', 'namespace' => 'Mastedu', 'middleware' => ['wechat.config','auth']], function(){
    Route::get('enroll', 'IndexController@index');
    Route::get('enroll/success/{id}', 'IndexController@enrollSuccess');
    Route::get('grade/second', 'IndexController@secondGrade');
    Route::get('grade/three', 'IndexController@threeGrade');
    Route::get('grade/six', 'IndexController@sixGrade');
    Route::get('grade/nine', 'IndexController@nineGrade');
    Route::get('brand/intro', 'IndexController@brandIntro');
    Route::get('enroll/green', 'IndexController@enrollGreen');
    Route::get('enroll/yellow', 'IndexController@enrollYellow');
    Route::get('turntable/lottery', 'IndexController@turntableLottery');
    Route::post('pay/{id}', 'IndexController@payOrder');
    Route::post('enroll/add', 'IndexController@addEnroll');
    Route::post('lottery/number', 'IndexController@lotteryNumber');
    Route::post('lottery', 'IndexController@lottery');
    Route::post('lottery/result', 'IndexController@lotterResult');
});

Route::group(['prefix' => 'mastedu', 'namespace' => 'Mastedu'], function(){
    Route::any('order/notify/{appId}', 'IndexController@notify');
});

Route::group(['prefix' => 'mastedu', 'namespace' => 'Admin'], function(){
    Route::get('admin/login', 'IndexController@loginView');
    Route::post('admin/login', 'IndexController@login');
    Route::get('admin/index', 'IndexController@enroll');
    Route::get('admin/lottery', 'IndexController@lottery');
});
